import json
import os

import mysql.connector

current_directory = os.path.dirname(os.path.abspath(__file__))

with open(current_directory + "/config.json", "r") as f:
    data = json.load(f)

user_data = data.get("user_data")
code_data = data.get("code_data")
user_temp = data.get("user_temp")
room_data = data.get("room_data")

user = data.get("user")
password = data.get("password")
host = data.get("host")
database_name = data.get("database")

database = mysql.connector.connect(user=user, password=password, host=host, database=database_name)
cursor = database.cursor()
